/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package se.bth.ke.firstfriend.dto;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import se.bth.ke.firstfriend.model.dto.TodoInfo;

/**
 *
 * @author Markus Goetz
 */
@XmlRootElement
public class TimelineData {
    @XmlElement
    private final String dateTimeFormat = "Gregorian";
    @XmlElement
    private List<EventInfo> events;

    public TimelineData() {}

    public TimelineData(List<TodoInfo> todos) {
        events = new ArrayList<EventInfo>(todos.size());
        for (TodoInfo info : todos) {
            events.add(new EventInfo(info));
        }
    }

    /**
     * @return the dateTimeFormat
     */
    public String getDateTimeFormat() {
        return dateTimeFormat;
    }

    /**
     * @return the events
     */
    public List<EventInfo> getEvents() {
        return events;
    }
}
